package server;

import java.net.MalformedURLException;
import java.rmi.AlreadyBoundException;
import java.rmi.RMISecurityManager;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class Server {
	public static void main(String[] args) throws RemoteException,
			MalformedURLException, AlreadyBoundException {

		System.setSecurityManager(new RMISecurityManager());
		java.security.Policy.getPolicy();
		SiteImpl rootNode = new SiteImpl("rootNode");
		Registry registry = LocateRegistry.getRegistry("localhost", 1099);
		registry.bind("rootNode", rootNode);
		System.out.println("rootNode created");
		System.out.println("Server ready...");

	}
}
